<template>
  <div class="page-register-step">
    <van-form @submit="store.threeSubmit">
      <van-cell-group inset>
        <van-field
          v-model="password"
          placeholder="请输入密码"
          maxlength="11"
          :rules="[{ required: true, message: '请输入密码' }]"
        />
      </van-cell-group>
      <div style="margin: 16px">
        <van-button
          :disabled="passwordButtonIsDisabled"
          round
          block
          type="primary"
          native-type="submit"
        >
          下一步
        </van-button>
      </div>
    </van-form>
  </div>
</template>

<script lang="ts" setup>
import { storeToRefs } from "pinia";
import { useRegisterStore } from "@/stores/register";

const store = useRegisterStore();
const { password, passwordButtonIsDisabled } = storeToRefs(store);
</script>
